<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
	<a href="javascript:$('#win_photo_edit').dialog('close');" class="window-close"></a>
	<div class="tc_top fl"><h2>编辑照片名称</h2></div>
	<div class="tc_add fl form">
	<input id="win_photoTitle" class="easyui-validatebox ipt_txt" data-options="required: true, validType: 'length[0, 30]'"/>
	<a id="win_photo_submit" class="easyui-linkbutton tg-btn" href="javascript:void(0);" onclick="tendog.win.photoAction.savePhoto(this)">确认保存</a>
	</div>
<script type="text/javascript">
	var photoTitle = $("li[photoId='${param['id']}'] span.photo_name").html();
	$("#win_photoTitle").val(photoTitle);
	tendog.win.photoAction={
		savePhoto:function() {
			var photo = {
						"photo.id":"${param['id']}",
						"photo.photoTitle":$("#win_photoTitle").val()
					};
			$.post('${ctx}/photo/save.do', photo, function(res) {
				if(res.code==1) {
					$("li[photoId='${param['id']}'] span.photo_name").html($("#win_photoTitle").val());
					$('#win_photo_edit').dialog('close');
				} else {
					msg.error(res.msg);
				}
			},"json");
		}
	};
</script>
</body>
</html>